package com.smartbus.bus.domain.dto;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;
import java.util.HashMap;

/**
 * 调度系统线路数据传输对象
 * 包含地图展示所需的路径、颜色等信息
 *
 * @author smartbus
 * @date 2025-09-24
 */
public class DispatchRouteDTO {

    /** 线路ID */
    private Long id;

    /** 线路名称 */
    private String routeName;

    /** 线路编号 */
    private String routeNumber;

    /** 地图显示颜色 */
    private String color;

    /** 渐变结束颜色（可选） */
    private String endColor;

    /** 是否使用渐变 */
    private Boolean gradient;

    /** SVG路径数据 */
    private String pathData;

    /** 线路包含的站点ID列表 */
    private List<Long> stations;

    /** 线路总距离 */
    private BigDecimal totalDistance;

    /** 运营状态 */
    private String operatingStatus;

    /** 预估行程时间 */
    private Long estimatedDuration;

    /** 当前运营车辆数 */
    private Integer activeVehicles;

    /** 起点坐标 */
    private Map<String, Integer> startPoint;

    /** 终点坐标 */
    private Map<String, Integer> endPoint;

    public DispatchRouteDTO() {}

    public DispatchRouteDTO(Long id, String routeName, String routeNumber) {
        this.id = id;
        this.routeName = routeName;
        this.routeNumber = routeNumber;
        // 设置默认值
        this.gradient = false;
        this.operatingStatus = "active";
        this.activeVehicles = 0;
    }

    // Getters and Setters
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getRouteName() {
        return routeName;
    }

    public void setRouteName(String routeName) {
        this.routeName = routeName;
    }

    public String getRouteNumber() {
        return routeNumber;
    }

    public void setRouteNumber(String routeNumber) {
        this.routeNumber = routeNumber;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public String getEndColor() {
        return endColor;
    }

    public void setEndColor(String endColor) {
        this.endColor = endColor;
    }

    public Boolean getGradient() {
        return gradient;
    }

    public void setGradient(Boolean gradient) {
        this.gradient = gradient;
    }

    public String getPathData() {
        return pathData;
    }

    public void setPathData(String pathData) {
        this.pathData = pathData;
    }

    public List<Long> getStations() {
        return stations;
    }

    public void setStations(List<Long> stations) {
        this.stations = stations;
    }

    public BigDecimal getTotalDistance() {
        return totalDistance;
    }

    public void setTotalDistance(BigDecimal totalDistance) {
        this.totalDistance = totalDistance;
    }

    public String getOperatingStatus() {
        return operatingStatus;
    }

    public void setOperatingStatus(String operatingStatus) {
        this.operatingStatus = operatingStatus;
    }

    public Long getEstimatedDuration() {
        return estimatedDuration;
    }

    public void setEstimatedDuration(Long estimatedDuration) {
        this.estimatedDuration = estimatedDuration;
    }

    public Integer getActiveVehicles() {
        return activeVehicles;
    }

    public void setActiveVehicles(Integer activeVehicles) {
        this.activeVehicles = activeVehicles;
    }

    public Map<String, Integer> getStartPoint() {
        return startPoint;
    }

    public void setStartPoint(Map<String, Integer> startPoint) {
        this.startPoint = startPoint;
    }

    public Map<String, Integer> getEndPoint() {
        return endPoint;
    }

    public void setEndPoint(Map<String, Integer> endPoint) {
        this.endPoint = endPoint;
    }

    @Override
    public String toString() {
        return "DispatchRouteDTO{" +
                "id=" + id +
                ", routeName='" + routeName + '\'' +
                ", routeNumber='" + routeNumber + '\'' +
                ", color='" + color + '\'' +
                ", operatingStatus='" + operatingStatus + '\'' +
                ", activeVehicles=" + activeVehicles +
                '}';
    }
}